package com.yc.entities;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 血糖测量数据
 * </p>
 *
 * @author kuakha
 * @since 2021-04-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="BloodSugarGluce对象", description="血糖测量数据")
public class BloodSugarGluce extends Model<BloodSugarGluce> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "绑定patient_info表主键id")
    private Integer gluceUserid;

    @ApiModelProperty(value = "血糖值")
    private BigDecimal gluceValue;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "添加时间")
    private Date gluceAddtime;

    @ApiModelProperty(value = "测量血糖时间段 0：空腹 1：早餐前 2：早餐后 3：午餐前 4：午餐后 5：晚餐前 6：晚餐后 7：睡前 8：凌晨 9：随机")
    private Integer gluceAttr;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "检测时间")
    private Date gluceExamtime;

    @ApiModelProperty(value = "血糖值状态 0-正常 1-偏高，2-偏低")
    private Integer gluceState;

    @ApiModelProperty(value = "绑定院长（医院）id")
    private Integer gluceDeanid;

    @ApiModelProperty(value = "科室唯一id 对应department表id")
    private Integer gluceDepartment;

    @ApiModelProperty(value = "血糖状态 1：已读 2：未读")
    private Integer gluceLooking;

    @ApiModelProperty(value = "设备号")
    private String gluceDn;

    @ApiModelProperty(value = "设备号")
    private String gluceType;

    @ApiModelProperty(value = "备注")
    private String gluceBz;

    @ApiModelProperty(value = "血糖值")
    @TableField(exist = false)
    private String bloodGluceValue;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
